package com.woniuxy.login.config;

import com.woniuxy.security.util.RsaUtil;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

/**
 * Date: 2021/6/30:12:51  <br/>
 * Description:
 */
@Configuration
public class SecurityConfig {
    @Resource
    private JwtConfig jwtConfig;

    //PostConstruct这个注解标注的方法会在项目启动的时候执行，controller执行前执行
    @PostConstruct
    public void init(){
        RsaUtil.generateKey(jwtConfig.getPubPath(),jwtConfig.getPriPath());
    }
}
